//
// DbServer.h
// ~~~~~~~~~~~~~~
//
//

#ifndef DB_SERVER_H
#define DB_SERVER_H

#include <string>
#include "message.h"
#include "inOutMsgCenter.h"
#include "DbService.h"
#include "favorite.pb.h"

class DbServer
{
private:
    InOutMsgCenter * pMsgCenter ;
    DbService *pDb ;
public:
    DbServer() ;
    ~DbServer () ;
    void run () ;
    void processRequest( RecvdMsg  & inMsg ) ;
    void processQueryReq(stock::Favorite & favStock) ;
private:
    stock::Market::MarketType toStockMarketType ( std::string & strType ) ;
} ;


#endif // DB_SERVER_H
